home *** CD-ROM | disk | FTP | other *** search
- Path: rcp6.elan.af.mil!rscernix!danpop
- From: danpop@mail.cern.ch (Dan Pop)
- Newsgroups: comp.lang.c
- Subject: Re: Calendar time
- Date: 20 Feb 96 23:37:19 GMT
- Organization: CERN European Lab for Particle Physics
- Message-ID: <danpop.824859439@rscernix>
- References: <312670A6.71F3@liant.com> <3129eb1d.1840152@news.iquest.net>
- NNTP-Posting-Host: ues5.cern.ch
- X-Newsreader: NN version 6.5.0 #7 (NOV)
-
- In <3129eb1d.1840152@news.iquest.net> rclark@iquest.net (Robert B. Clark) writes:
-
- >[Posted and emailed]
- >
- >On Sat, 17 Feb 1996 18:19:50 -0600, Robert Barron <barron@liant.com>
- >wrote:
- >
- >>hours is off. Is there a simple routine available that will break down
- >>a time_t variable into it's constituent parts without any conversion?
- >
- >Presumably, time_t is just a long int that represents the number of
- >seconds since 1 Jan 1970 at 00:00:00 GMT.
-
- "Presumably" is the keyword here. On my system:
-
- #ifndef _TIME_T
- #define _TIME_T
- typedef int time_t;
- #endif
-
- But time_t can be any arithmetic type and the time is encoded in an
- implementation-specific way.
-
- The routines to break down a time_t variable are gmtime and localtime.
-
- Dan
- --
- Dan Pop
- CERN, CN Division
- Email: danpop@mail.cern.ch
- Mail: CERN - PPE, Bat. 31 R-004, CH-1211 Geneve 23, Switzerland
-